#define _CRT_SECURE_NO_WARNINGS 1

#include<iostream>
#include<vector>
#include<algorithm>

using namespace std;

void dfs(int j, vector<int>& nums, vector<int>& sel, vector<bool>& sta, vector<vector<int>>& res)
{
    if (j >= nums.size())
    {
        res.push_back(sel);
        return;
    }

    for (int i = 0; i < nums.size(); i++)
    {
        if (sta[i] || (i > 0 && nums[i] == nums[i - 1] && !sta[i - 1]))
            continue;

        sel[j] = nums[i];
        sta[i] = true;
        dfs(j + 1, nums, sel, sta, res);
        sta[i] = false;
    }
}
vector<vector<int>> permuteUnique(vector<int>& nums) {
    vector<bool> sta(nums.size(), false);
    vector<int> sel(nums.size());
    vector<vector<int>> res;
    sort(nums.begin(), nums.end());
    dfs(0, nums, sel, sta, res);
    return res;
}

//int main()
//{
//    vector<int> v = { 1,1,2 };
//    auto vv = permuteUnique(v);
//    return 0;
//}


string categorizeBox(int length, int width, int height, int mass) {
    bool bulky = false, heavy = false;
    if (length >= 10000 || width >= 10000 || height >= 10000)
        bulky = true;

    if ((long long)length * width * height >= 1e9)
        bulky = true;

    if (mass >= 100)
        heavy = true;

    if (bulky && heavy)
        return "Both";
    else if (bulky == true && heavy == false)
        return "Bulky";
    else if (bulky = false && heavy == true)
        return "Heavy";
    else
        return "Neither";
}

int main()
{
    categorizeBox(2909, 3968, 3272, 727);
    return 0;
}